<template>

    <div>

        <h1>请选择你喜欢的专栏</h1>

        <span v-for="(item, index) in list" :key="index">
          <input type="checkbox" v-model="love" name="hobby" :value="item" >
              {{ item }}
        </span>

        <ul v-show="this.love.length > 0">
          <li v-for="(item , index) in love" :key="index">
                  {{ item }}
          </li>
        </ul>

    </div>


</template>

<script>
export default {
    data () {
      return {
        list: ["科幻", "喜剧", "动漫", "冒险", "科技", "军事", "娱乐", "奇闻"],

        love:[]
      }
    }
}
</script>

<style>

</style>